package ch02;

import sun.applet.Main;

/**
 * @author zhu
 * @date 2024-03-29
 */
public class MainTest02 {
    public <T> T getNew(Class<T> str) throws Exception{
        return str.getConstructor().newInstance();
    }

    public static void main(String[] args) throws Exception {
        MainTest02 m = new MainTest02();
        m.getNew(Person.class);
    }
}
